#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<unordered_map>
using namespace std;
class Solution {
public:
    vector<vector<string>> groupAnagrams(vector<string>& strs)
    {
        unordered_map<string, vector<string>> hush;
        for (int i = 0; i < strs.size(); i++)
        {
            string tmp = strs[i];
            sort(tmp.begin(), tmp.end());
            hush[tmp].push_back(strs[i]);
        }
        vector<vector<string>> ret;
        for (auto& [x, y] : hush)
        {
            ret.push_back(y);
        }
        return ret;

    }
};